﻿using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CRM.Models
{
    [Table("oem_company")]
    [Comment("OEM管理_分配公司")]
    [Index(nameof(CompanyId), Name = "CompanyId")]
    [Index(nameof(OemId), Name = "OemId")]
    [Index(nameof(AllotUserId), Name = "AllotUserId")]
    [Index(nameof(AllotUsername), Name = "AllotUsername")]
    public class OemCompany : BaseModel
    {
        [Column("id"), Key, Required]
        public int Id { get; set; }

        [Column("oem_id"), Comment("OEM ID"), Required]
        public int OemId { get; set; }

        [Column("company_id", TypeName = "int(11)"), Comment("被分配公司ID"), Required]
        public int CompanyId { get; set; }

        [Column("allot_user_id", TypeName = "int(11)"), Comment("被分配公司管理员账户用户id"), Required]
        public int AllotUserId { get; set; }

        [Column("allot_username", TypeName = "varchar(255)"), Comment("被分配公司管理员账户用户名"), Required]
        public string AllotUsername { get; set; }

        [Column("operate_truename", TypeName = "varchar(255)"), Comment("分配操作用户姓名"), Required]
        public string OperateTruename { get; set; }

    }
}
